function delete_server(server_id) {
	var msg = "Do you want to delete?";
	if (! confirm(msg)) {
		return;
	}
	new Ajax.Request('serverdelete.htm?id='+server_id,
	{
		method:'post',
    	onSuccess: function(transport){
			document.location='servers.htm';            
    	},
    	onFailure: function(transport){ 
    		var response = transport.responseText || "no response text";
    		alert('Something went wrong: \n\n' + response) ;
    	}
  	});
}

function delete_administrator(administrator_id) {
    var msg = "Do you want to delete?";
    if (! confirm(msg)) {
        return;
    }
    new Ajax.Request('administratordelete.htm?id='+administrator_id,
    {
        method:'post',
        onSuccess: function(transport){
            document.location='administrators.htm';
        },
        onFailure: function(transport){ 
            var response = transport.responseText || "no response text";
            alert('Something went wrong: \n\n' + response) ;
        }
    });
}

function delete_event(event_id) {
    var msg = "Do you want to delete?";
    if (! confirm(msg)) {
        return;
    }
    new Ajax.Request('eventdelete.htm?id='+event_id,
    {
        method:'post',
        onSuccess: function(transport){
            document.location='events.htm';
        },
        onFailure: function(transport){ 
            var response = transport.responseText || "no response text";
            alert('Something went wrong: \n\n' + response) ;
        }
    });
}


